home *** CD-ROM | disk | FTP | other *** search
/ PC World 2007 March / PCWorld_2007-03_cd.bin / domacnost a kancelar / scribus / scribus-1.3.3.7-win32-install.exe / lib / dbhash.py < prev    next >
Text File  |  2004-06-01  |  420b  |  17 lines

  1. """Provide a (g)dbm-compatible interface to bsddb.hashopen."""
  2.  
  3. import sys
  4. try:
  5.     import bsddb
  6. except ImportError:
  7.     # prevent a second import of this module from spuriously succeeding
  8.     del sys.modules[__name__]
  9.     raise
  10.  
  11. __all__ = ["error","open"]
  12.  
  13. error = bsddb.error                     # Exported for anydbm
  14.  
  15. def open(file, flag = 'r', mode=0666):
  16.     return bsddb.hashopen(file, flag, mode)
  17.